<template>
    <div class="User-manage-template">
        <UserDefault v-if="curPath.startsWith('default')" ref="userDefault"></UserDefault>
        <UserCreate v-if="curPath.startsWith('create')||curPath.startsWith('edit')||curPath.startsWith('look')"
                    ref="userCreate"></UserCreate>
        <UserAuthorized v-if="curPath.startsWith('authorized')" ref="userAuthorized"></UserAuthorized>
    </div>
</template>

<script>
    import UserDefault from "../default/UserDefault";
    import UserCreate from "../create/UserCreate";
    import UserAuthorized from "../UserAuthorized";

    export default {
        name: "UserManage",
        components: {
            UserCreate, UserDefault, UserAuthorized
        },
        data() {
            return {
                curPath: 'default'
            }
        },
        methods: {
            getWorkNo() {
                let number = this.curPath.split('@')[1];
                console.log(number)
            }
        },
        watch: {
            curPath() {
                this.getWorkNo();
            }
        }
    }
</script>

<style lang="scss">
    .User-manage-template {
        background-color: #ffffff;
        width: 100%;
        height: 100%;
    }
</style>